import Vue from 'vue'
import Router from 'vue-router'
// import Top from '@/components/layout/top'
import Header from '@/components/layout/header'
import Copyright from '@/components/layout/copyright'
import Login from '../pages/login'
import Home from '../pages/home'
import news from '../pages/news'
import newsDetails from '../pages/news/newsDetails'
import College from '../pages/college'
import courseDetails from '../pages/courseDetails'
import contractUs from '../pages/contractUs'
import exam from '../pages/exam'
import examRes from '../pages/examRes'
import videoCourse from '../pages/videoCourse'
import playVideo from '../pages/playVideo'
import myCenter from '../pages/myCenter'
import course from '../pages/course'
import download from '../pages/download'
import questionBank from '../pages/questionBank'
import practice from '../pages/questionBank/practice'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/layout',
      name: 'Header',
      component: Header
    },
    {
      path: '/layout',
      name: 'Copyright',
      component: Copyright
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/news',
      name: 'news',
      component: news,
      meta: {
        title: '新闻中心'
    },
      children:[{
          path: 'newsDetails',
          name: 'newsDetails',
          component: newsDetails,
          meta: {
            title: '新闻详情'
        },
        
      }]
    },
    
    {
      path: '/college',
      name: 'College',
      component: College
    },
    {
      path: '/courseDetails',
      name: 'courseDetails',
      component: courseDetails
    },
    {
      path: '/contractUs',
      name: 'contractUs',
      component: contractUs
    },
    {
      path: '/examRes',
      name: 'examRes',
      component: examRes
    },
    {
      path: '/exam',
      name: 'exam',
      component: exam
    },
    {
      path: '/videoCourse',
      name: 'videoCourse',
      component: videoCourse
    },
    {
      path: '/playVideo',
      name: 'playVideo',
      component: playVideo
    },
    {
      path: '/myCenter',
      name: 'myCenter',
      component: myCenter
    },
    {
      path: '/course',
      name: 'course',
      component: course
    },
    {
      path: '/download',
      name: 'download',
      component: download
    },
    {
      path: '/questionBank',
      name: 'questionBank',
      component: questionBank,
      // children:[
      //   {
      //     path: '/questionBank/practice',
      //     name: 'practice',
      //     component: practice
      //   },
      // ]
    },
    {
      path: '/questionBank/practice',
      name: 'practice',
      component: practice,
    }
  ]
})
